namespace ext.form
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>Configuration Structure</summary>
	/// <definedin>src\widgets\form\BasicForm.js</definedin>
	public sealed class BasicForm_Configuration : Record
	{
		
		#region Fields
		/// <summary>The request method to use (GET or POST) for form actions if one isn&apos;t supplied in the action options.</summary>
		/// <definedin>src\widgets\form\BasicForm.js</definedin>
		[ScriptName("method")]
		public string Method;
		
		/// <summary>
		/// An Ext.data.DataReader (e.g. {@link Ext.data.XmlReader}) to be used to read
		/// data when executing &apos;load&apos; actions. This is optional as there is built-in
		/// support for processing JSON. For additional information on using an XMLReader
		/// see the example provided in examples/form/xml-form.html.
		/// </summary>
		/// <definedin>src\widgets\form\BasicForm.js</definedin>
		[ScriptName("reader")]
		public ext.data.DataReader Reader;
		
		/// <summary>
		/// An Ext.data.DataReader (e.g. {@link Ext.data.XmlReader}) to be used to
		/// read field error messages returned from &apos;submit&apos; actions. This is optional
		/// as there is built-in support for processing JSON.  The Records which provide messages for the invalid Fields must use the
		/// Field name (or id) as the Record ID, and must contain a field called &apos;msg&apos;
		/// which contains the error message.  The errorReader does not have to be a full-blown implementation of a
		/// DataReader. It simply needs to implement a read(xhr) function
		/// which returns an Array of Records in an object with the following
		/// structure:  
		/// {
		/// records: recordArray
		/// }
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;An Ext.data.DataReader (e.g. {@link Ext.data.XmlReader}) to be used to
		/// read field error messages returned from &apos;submit&apos; actions. This is optional
		/// as there is built-in support for processing JSON.&lt;/p&gt;
		/// &lt;p&gt;The Records which provide messages for the invalid Fields must use the
		/// Field name (or id) as the Record ID, and must contain a field called &apos;msg&apos;
		/// which contains the error message.&lt;/p&gt;
		/// &lt;p&gt;The errorReader does not have to be a full-blown implementation of a
		/// DataReader. It simply needs to implement a &lt;tt&gt;read(xhr)&lt;/tt&gt; function
		/// which returns an Array of Records in an object with the following
		/// structure:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
		/// {
		/// records: recordArray
		/// }
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\BasicForm.js</definedin>
		[ScriptName("errorReader")]
		public ext.data.DataReader ErrorReader;
		
		/// <summary>
		/// The URL to use for form actions if one isn&apos;t supplied in the
		/// {@link #doAction doAction} options.
		/// </summary>
		/// <htmlSummary>
		/// The URL to use for form actions if one isn&apos;t supplied in the
		/// &lt;code&gt;{@link #doAction doAction} options&lt;/code&gt;.
		/// </htmlSummary>
		/// <definedin>src\widgets\form\BasicForm.js</definedin>
		[ScriptName("url")]
		public string Url;
		
		/// <summary>
		/// Set to true if this form is a file upload.
		/// File uploads are not performed using normal &apos;Ajax&apos; techniques, that is they are not
		/// performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
		/// DOM &amp;lt;form&gt; element temporarily modified to have its
		/// target set to refer
		/// to a dynamically generated, hidden &amp;lt;iframe&gt; which is inserted into the document
		/// but removed after the return data has been gathered.  The server response is parsed by the browser to create the document for the IFRAME. If the
		/// server is using JSON to send the return object, then the
		/// Content-Type header
		/// must be set to &quot;text/html&quot; in order to tell the browser to insert the text unchanged into the document body.  Characters which are significant to an HTML parser must be sent as HTML entities, so encode
		/// &quot;&amp;lt;&quot; as &quot;&amp;amp;lt;&quot;, &quot;&amp;amp;&quot; as &quot;&amp;amp;amp;&quot; etc.  The response text is retrieved from the document, and a fake XMLHttpRequest object
		/// is created containing a responseText property...
		/// </summary>
		/// <htmlSummary>
		/// Set to true if this form is a file upload.
		/// &lt;p&gt;File uploads are not performed using normal &apos;Ajax&apos; techniques, that is they are &lt;b&gt;not&lt;/b&gt;
		/// performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
		/// DOM &lt;tt&gt;&amp;lt;form&gt;&lt;/tt&gt; element temporarily modified to have its
		/// &lt;a href=&quot;http://www.w3.org/TR/REC-html40/present/frames.html#adef-target&quot;&gt;target&lt;/a&gt; set to refer
		/// to a dynamically generated, hidden &lt;tt&gt;&amp;lt;iframe&gt;&lt;/tt&gt; which is inserted into the document
		/// but removed after the return data has been gathered.&lt;/p&gt;
		/// &lt;p&gt;The server response is parsed by the browser to create the document for the IFRAME. If the
		/// server is using JSON to send the return object, then the
		/// &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17&quot;&gt;Content-Type&lt;/a&gt; header
		/// must be set to &quot;text/html&quot; in order to tell the browser to insert the text unchanged into the document body.&lt;/p&gt;
		/// &lt;p&gt;Characters which are significant to an HTML parser must be sent as HTML entities, so encode
		/// &quot;&amp;lt;&quot; as &quot;&amp;amp;lt;&quot;, &quot;&amp;amp;&quot; as &quot;&amp;amp;amp;&quot; etc.&lt;/p&gt;
		/// &lt;p&gt;The response text is retrieved from the document, and a fake XMLHttpRequest object
		/// is created containing a &lt;tt&gt;responseText&lt;/tt&gt; property in order to conform to the
		/// requirements of event handlers and callbacks.&lt;/p&gt;
		/// &lt;p&gt;Be aware that file upload packets are sent with the content type &lt;a href=&quot;http://www.faqs.org/rfcs/rfc2388.html&quot;&gt;multipart/form&lt;/a&gt;
		/// and some server technologies (notably JEE) may require some custom processing in order to
		/// retrieve parameter names and parameter values from the packet content.&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\BasicForm.js</definedin>
		[ScriptName("fileUpload")]
		public bool FileUpload;
		
		/// <summary>Parameters to pass with all requests. e.g. baseParams: {id: &apos;123&apos;, foo: &apos;bar&apos;}.  Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</summary>
		/// <htmlSummary>
		/// &lt;p&gt;Parameters to pass with all requests. e.g. baseParams: {id: &apos;123&apos;, foo: &apos;bar&apos;}.&lt;/p&gt;
		/// &lt;p&gt;Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\BasicForm.js</definedin>
		[ScriptName("baseParams")]
		public object BaseParams;
		
		/// <summary>Timeout for form actions in seconds (default is 30 seconds).</summary>
		/// <definedin>src\widgets\form\BasicForm.js</definedin>
		[ScriptName("timeout")]
		public System.Number Timeout;
		
		/// <summary>
		/// If specified load and submit actions will be handled
		/// with {@link Ext.form.Action.DirectLoad} and {@link Ext.form.Action.DirectSubmit}.
		/// Methods which have been imported by Ext.Direct can be specified here to load and submit
		/// forms.
		/// Such as the following: 
		/// api: {
		/// load: App.ss.MyProfile.load,
		/// submit: App.ss.MyProfile.submit
		/// }
		///  Load actions can use {@link #paramOrder} or {@link #paramsAsHash}
		/// to customize how the load method is invoked.
		/// Submit actions will always use a standard form submit. The formHandler configuration must
		/// be set on the associated server-side method which has been imported by Ext.Direct
		/// </summary>
		/// <htmlSummary>
		/// If specified load and submit actions will be handled
		/// with {@link Ext.form.Action.DirectLoad} and {@link Ext.form.Action.DirectSubmit}.
		/// Methods which have been imported by Ext.Direct can be specified here to load and submit
		/// forms.
		/// Such as the following:&lt;pre&gt;&lt;code&gt;
		/// api: {
		/// load: App.ss.MyProfile.load,
		/// submit: App.ss.MyProfile.submit
		/// }
		/// &lt;/code&gt;&lt;/pre&gt;
		/// &lt;p&gt;Load actions can use &lt;code&gt;{@link #paramOrder}&lt;/code&gt; or &lt;code&gt;{@link #paramsAsHash}&lt;/code&gt;
		/// to customize how the load method is invoked.
		/// Submit actions will always use a standard form submit. The formHandler configuration must
		/// be set on the associated server-side method which has been imported by Ext.Direct&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\BasicForm.js</definedin>
		/// <optional>Optional Field</optional>
		[ScriptName("api")]
		public object Api;
		
		/// <summary>
		/// A list of params to be executed server side.
		/// Defaults to undefined. Only used for the {@link #api}load configuration.
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;A list of params to be executed server side.
		/// Defaults to &lt;tt&gt;undefined&lt;/tt&gt;. Only used for the &lt;code&gt;{@link #api}&lt;/code&gt;
		/// &lt;code&gt;load&lt;/code&gt; configuration.&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;Specify the params in the order in which they must be executed on the
		/// server-side as either (1) an Array of String values, or (2) a String of params
		/// delimited by either whitespace, comma, or pipe. For example,
		/// any of the following would be acceptable:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
		/// paramOrder: [&apos;param1&apos;,&apos;param2&apos;,&apos;param3&apos;]
		/// paramOrder: &apos;param1 param2 param3&apos;
		/// paramOrder: &apos;param1,param2,param3&apos;
		/// paramOrder: &apos;param1|param2|param&apos;
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\BasicForm.js</definedin>
		[ScriptName("paramOrder")]
		public ext.auto.System_String_Or_System_Array ParamOrder;
		
		/// <summary>
		/// Only used for the {@link #api}load configuration. Send parameters as a collection of named
		/// arguments (defaults to false). Providing a
		/// {@link #paramOrder} nullifies this configuration.
		/// </summary>
		/// <htmlSummary>
		/// Only used for the &lt;code&gt;{@link #api}&lt;/code&gt;
		/// &lt;code&gt;load&lt;/code&gt; configuration. Send parameters as a collection of named
		/// arguments (defaults to &lt;tt&gt;false&lt;/tt&gt;). Providing a
		/// &lt;tt&gt;{@link #paramOrder}&lt;/tt&gt; nullifies this configuration.
		/// </htmlSummary>
		/// <definedin>src\widgets\form\BasicForm.js</definedin>
		[ScriptName("paramsAsHash")]
		public bool ParamsAsHash;
		
		/// <summary>The default title to show for the waiting message box (defaults to &apos;Please Wait...&apos;)</summary>
		/// <htmlSummary>The default title to show for the waiting message box (defaults to &lt;tt&gt;&apos;Please Wait...&apos;&lt;/tt&gt;)</htmlSummary>
		/// <definedin>src\widgets\form\BasicForm.js</definedin>
		[ScriptName("waitTitle")]
		public string WaitTitle;
		
		/// <summary>
		/// If set to true, {@link #reset}() resets to the last loaded
		/// or {@link #setValues}() data instead of when the form was first created. Defaults to false.
		/// </summary>
		/// <htmlSummary>
		/// If set to &lt;tt&gt;true&lt;/tt&gt;, {@link #reset}() resets to the last loaded
		/// or {@link #setValues}() data instead of when the form was first created. Defaults to &lt;tt&gt;false&lt;/tt&gt;.
		/// </htmlSummary>
		/// <definedin>src\widgets\form\BasicForm.js</definedin>
		[ScriptName("trackResetOnLoad")]
		public bool TrackResetOnLoad;
		
		/// <summary>
		/// If set to true, standard HTML form submits are used instead
		/// of XHR (Ajax) style form submissions. Defaults to false.
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;If set to &lt;tt&gt;true&lt;/tt&gt;, standard HTML form submits are used instead
		/// of XHR (Ajax) style form submissions. Defaults to &lt;tt&gt;false&lt;/tt&gt;.&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; When using &lt;code&gt;standardSubmit&lt;/code&gt;, the
		/// &lt;code&gt;options&lt;/code&gt; to &lt;code&gt;{@link #submit}&lt;/code&gt; are ignored because
		/// Ext&apos;s Ajax infrastracture is bypassed. To pass extra parameters (e.g.
		/// &lt;code&gt;baseParams&lt;/code&gt; and &lt;code&gt;params&lt;/code&gt;), utilize hidden fields
		/// to submit extra data, for example:&lt;/p&gt;
		/// &lt;pre&gt;&lt;code&gt;
		/// new Ext.FormPanel({
		/// standardSubmit: true,
		/// baseParams: {
		/// foo: &apos;bar&apos;
		/// },
		/// {@link url}: &apos;myProcess.php&apos;,
		/// items: [{
		/// xtype: &apos;textfield&apos;,
		/// name: &apos;userName&apos;
		/// }],
		/// buttons: [{
		/// text: &apos;Save&apos;,
		/// handler: function(){
		/// var fp = this.ownerCt.ownerCt,
		/// form = fp.getForm();
		/// if (form.isValid()) {
		/// // check if there are baseParams and if
		/// // hiddent items have been added already
		/// if (fp.baseParams &amp;&amp; !fp.paramsAdded) {
		/// // add hidden items for all baseParams
		/// for (i in fp.baseParams) {
		/// fp.add({
		/// xtype: &apos;hidden&apos;,
		/// name: i,
		/// value: fp.baseParams[i]
		/// });
		/// }
		/// fp.doLayout();
		/// // set a custom flag to prevent re-adding
		/// fp.paramsAdded = true;
		/// }
		/// form.{@link #submit}();
		/// }
		/// }
		/// }]
		/// });
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\BasicForm.js</definedin>
		[ScriptName("standardSubmit")]
		public bool StandardSubmit;
		#endregion
		
		#region ext.util.Observable_Configuration Members
		/// <summary>
		/// A config object containing one or more event handlers to be added to this
		/// object during initialization. This should be a valid listeners config object as specified in the
		/// {@link #addListener} example for attaching multiple handlers at once.
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;A config object containing one or more event handlers to be added to this
		/// object during initialization. This should be a valid listeners config object as specified in the
		/// {@link #addListener} example for attaching multiple handlers at once.&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;DOM events from ExtJs {@link Ext.Component Components}&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;While &lt;i&gt;some&lt;/i&gt; ExtJs Component classes export selected DOM events (e.g. &quot;click&quot;, &quot;mouseover&quot; etc), this
		/// is usually only done when extra value can be added. For example the {@link Ext.DataView DataView}&apos;s
		/// &lt;b&gt;&lt;code&gt;{@link Ext.DataView#click click}&lt;/code&gt;&lt;/b&gt; event passing the node clicked on. To access DOM
		/// events directly from a Component&apos;s HTMLElement, listeners must be added to the &lt;i&gt;{@link Ext.Component#getEl Element}&lt;/i&gt; after the Component
		/// has been rendered. A plugin can simplify this step:&lt;pre&gt;&lt;code&gt;
		/// // Plugin is configured with a listeners config object.
		/// // The Component is appended to the argument list of all handler functions.
		/// Ext.DomObserver = Ext.extend(Object, {
		/// constructor: function(config) {
		/// this.listeners = config.listeners ? config.listeners : config;
		/// },
		///
		/// // Component passes itself into plugin&amp;#39;s init method
		/// init: function(c) {
		/// var p, l = this.listeners;
		/// for (p in l) {
		/// if (Ext.isFunction(l[p])) {
		/// l[p] = this.createHandler(l[p], c);
		/// } else {
		/// l[p].fn = this.createHandler(l[p].fn, c);
		/// }
		/// }
		///
		/// // Add the listeners to the Element immediately following the render call
		/// c.render = c.render.{@link Function#createSequence createSequence}(function() {
		/// var e = c.getEl();
		/// if (e) {
		/// e.on(l);
		/// }
		/// });
		/// },
		///
		/// createHandler: function(fn, c) {
		/// return function(e) {
		/// fn.call(this, e, c);
		/// };
		/// }
		/// });
		///
		/// var combo = new Ext.form.ComboBox({
		///
		/// // Collapse combo when its element is clicked on
		/// plugins: [ new Ext.DomObserver({
		/// click: function(evt, comp) {
		/// comp.collapse();
		/// }
		/// })],
		/// store: myStore,
		/// typeAhead: true,
		/// mode: &apos;local&apos;,
		/// triggerAction: &apos;all&apos;
		/// });
		/// &lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\ext-core\src\util\Observable.js</definedin>
		/// <optional>Optional Field</optional>
		[ScriptName("listeners")]
		public object Listeners;
		#endregion
	}
}
